<?php echo $header; ?><?php echo $column_left; ?>
<div id="content">
	<div class="page-header">
		<div class="container-fluid">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">
						<i class="fa fa-list"></i>数据报表
					</h3>
				</div>
				<div class="panel-body">
					<div class="table-responsive">
						<table class="table table-bordered table-hover">
							<thead>

							</thead>
							<tbody>
								<tr>
									<td class="text-left">订单报表</td>
									<td class="text-left" style="width: 250px">
										<div class="input-group date" id="order_start_time">
											<input type="text" id="order_sale_start_added"
												placeholder="开始时间" data-date-format="YYYY-MM-DD HH:mm:ss"
												class="form-control" /> <span class="input-group-btn">
												<button type="button" class="btn btn-default">
													<i class="fa fa-calendar"></i>
												</button>
											</span>
										</div>

									</td>

									<td class="text-left" style="width: 250px">
										<div class="input-group date" id="order_end_time">
											<input type="text" id="order_sale_end_added"
												placeholder="结束时间" data-date-format="YYYY-MM-DD HH:mm:ss"
												class="form-control" /> <span class="input-group-btn">
												<button type="button" class="btn btn-default">
													<i class="fa fa-calendar"></i>
												</button>
											</span>
										</div>

									</td>
									<td class="text-left"><select style="width: 120px"
										id="input-order-sale-status" class="form-control">

											<option value="0"><?php echo $text_missing; ?></option>
                  <?php foreach ($order_statuses as $order_status) { ?>

                  <option
												value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
                  <?php } ?>
                </select></td>


									<td class="text-right"><a data-toggle="tooltip" title="下载"
										class="btn btn-primary" data-original-title="下载"
										id="order_down"><i class="fa fa-download"></i></a></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript"><!--
$('#order_start_time,#order_end_time').datetimepicker({
	pickTime: true
});

$('#order_down').on("click",function(){
	window.location.href = 'index.php?route=datareport/order/sale_order&start_time='+encodeURIComponent($("#order_sale_start_added").val())+'&end_time='+encodeURIComponent($("#order_sale_end_added").val())+'&order_status_id='+encodeURIComponent($("#input-order-sale-status").val())+'&token=<?php echo $token; ?>';

})
</script>
<?php echo $footer; ?>
